﻿<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
            mc:Ignorable="d" x:Class="Achievements.AchievementPopup" x:Name="control" d:DesignWidth="480" d:DesignHeight="800">

  <Border HorizontalAlignment="Stretch" Height="70" Margin="0" VerticalAlignment="Top" Width="Auto"
          BorderThickness="0,0,0,1" BorderBrush="{StaticResource PhoneContrastBackgroundBrush}">

    <Grid Background="{StaticResource PhoneBackgroundBrush}">
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition />
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto" />
        <ColumnDefinition />
        <ColumnDefinition Width="Auto" />
      </Grid.ColumnDefinitions>
      <Rectangle Fill="{StaticResource PhoneContrastBackgroundBrush}" Height="48" VerticalAlignment="Center" Width="48"
                 Grid.RowSpan="2" HorizontalAlignment="Center" Margin="12,0">
        <Rectangle.OpacityMask>
          <ImageBrush Stretch="Fill" ImageSource="{Binding Achievement.SmallImageUri, ElementName=control}" />
        </Rectangle.OpacityMask>
      </Rectangle>

      <TextBlock Margin="12,0" TextWrapping="Wrap" Text="Achievement Unlocked!" VerticalAlignment="Top"
                 d:LayoutOverrides="Width" Grid.Column="1" Style="{StaticResource PhoneTextSubtleStyle}" />
      <TextBlock TextWrapping="Wrap" d:LayoutOverrides="Width" Grid.Column="1"
                 Style="{StaticResource PhoneTextNormalStyle}" VerticalAlignment="Center"
                 Text="{Binding Achievement.Title, ElementName=control}" Grid.Row="1" Margin="12,-12,12,0" />
      <TextBlock Margin="0,12,27,12" TextWrapping="Wrap"
                 Text="{Binding Achievement.AchievementValue, ElementName=control}" VerticalAlignment="Center" d:LayoutOverrides="Width"
                 Grid.RowSpan="2" Grid.Column="2" HorizontalAlignment="Right" Style="{StaticResource PhoneTextAccentStyle}"
                 FontSize="26.667" FontFamily="Segoe WP Semibold" FontWeight="Bold" />
    </Grid>
  </Border>
</UserControl>